import { Tooltip } from 'antd';
export const Ellipsis = (text: any) => {
  return (
    <Tooltip placement="top" mouseLeaveDelay={0.5} destroyTooltipOnHide={true} title={text}>
      <span
        style={{
          overflow: 'hidden',
          textOverflow: 'ellipsis',
          whiteSpace: 'nowrap',
          width: '100%',
          display: 'inline-block',
          cursor: 'pointer',
          textAlign: 'center',
        }}
      >
        {text}
      </span>
    </Tooltip>
  );
};
